{include file="./headStart.tpl"}
{literal}
<style>
option :hover
{
	color:red;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$("#insertBtn").click(function(event){
	var data1 = $(".partyId").val();
	var data2 = $(".categoryId").val();
	var data3 = $(".typeOfCallId").val();
     if(data1 == 0)
     {
       alert("Select Customer");
       $(".partyId").focus();
       return false;
     }
      if(data2 == 0)
     {
       alert("Select System");
       $(".categoryId").focus();
       return false;
     }
     if(data3 == 0)
     {
       alert("select Type OF Call");
       $(".typeOfCallId").focus();
       return false;
     }
  });
});
</script>
{/literal}
<script>
  $(document).ready(function(){
    $("#frmComplain").validate({
    rules: {
      serviceCharge: {
        required: true,
        number: true
      }
    }
  });
});
</script>
{include file="./headEnd.tpl"}
<form name="frmComplain" action="{$smarty.server.PHP_SELF}" id="frmComplain" method="post">
<input type="hidden" name="complainServiceId" value="{$complainServiceId}" /> 
<input type="hidden" name="complete" value="{$complete}" /> 
<input type="hidden" name="inComplete" value="{$inComplete}" />
<input type="hidden" name="print" value="{$print}" />
{if $isEdit == 1 || $complete == 1 || $inComplete == 1}
<input type="hidden" name="targetedDate" value="{$targetedDate}" />
{/if}
<table align="center" border="1" cellpadding="2" cellspacing="1" >
	<tr>
	  <td align="center" class="table1" colspan="4">Complaint Call Entry</td>
	</tr>
	<tr>
	  <td align="left" class="table2">Customer  <font color="red"> *</font> :</td>
	  <td class="table2">
	    {if $isEdit == 1 || $complete == 1 || $inComplete == 1}
	      <select  name="partyId" id="partyId" disabled="disabled">
	    {else}  
	    <select name="partyId" id="partyId" class="partyId">
	    {/if}
	      <option value="0" class="companyName">Company Name</option>
	      {html_options values=$partyId output=$companyName selected=$partySelected}
	    </select>
	    <input type="hidden" name="partyIdEdited" value="{$partySelected}" />
	    <a href="party.php?redirectFrom=complainSevice" class="link">New Customer</a>  
	  </td>
	  <td align="left" class="table2">System  <font color="red"> *</font> : </td>
	  <td class="table2">
	  {if $isEdit == 1 || $complete == 1 || $inComplete == 1}
	    <select name="categoryId" id="categoryId" disabled="disabled">
	  {else}
	    <select name="categoryId" id="categoryId" class="categoryId">
	  {/if}
	      <option value="0">Name</option>
	      {html_options values=$categoryId output=$categoryName selected=$categorySelected}
	    </select>
	    <input type="hidden" name="categoryIdEdited" value="{$categorySelected}" />
	  </td>
	</tr>
	<tr>
	  <td align="left" class="table2">Complaint Date : </td>
	  <td NOWRAP class="table2">
	  {if $isEdit == 1 || $complete == 1 || $inComplete == 1}
	    <b>&nbsp;{$complainDate}</b>
	    <input type="hidden" name="complainDate" value="{$ymdComplainDate}">
	  {else}
	    {html_select_date prefix="complainDate" time="$complainDate" start_year="-3" end_year="+1" month_format="%m" field_order="DMY" 
	     day_value_format="%02d" disabled=disabled}
	  {/if}
	  </td>
	   <td align="left" class="table2">Target Date :</td>
	   <td class="table2">
	   {if $complete == 1}
	     <b>&nbsp;{$targetedDate}</b>
	   {else}
	     {html_select_date prefix="insertDate" start_year="-1" end_year="+3" field_order="DMY" month_format="%m" time=$targetedDate}
	   {/if}
	   </td>
	 </tr>
	<tr>
	  <td align="left" class="table2">Description : </td>
	  <td size=5 class="table2"><Textarea Name="description" Rows="3" Cols="50">{$description}</Textarea></td>
	  <td align="left" class="table2">Important Point : </td>
	  <td class="table2"><textarea Name="importantPoint" Rows="3" Cols="50">{$importantPoint}</textarea></td>
	</tr>
	<tr>
	  <td align="left" class="table2">Type OF Call  <font color="red"> *</font>: </td>
	  <td class="table2">
	    <select name="typeOfCallId" id="typeOfCallId" class="typeOfCallId">
	      <option value="0">Type OF Call</option>
	      {html_options values=$typeOfCallId output=$type selected=$typeOfCallIdSelected}
	    </select>
	  </td>
	   <td align="left" class="table2">Service Charge : </td>
	   <td class="table2"><input type="text" name="serviceCharge" id="serviceCharge" value="{$serviceCharge}"></td>
	</tr>
	<tr>
	  <td align="left" class="table2">Remarks :</td>
	  <td class="table2"><textarea Name="remarks" Rows="1" Cols="50">{$remarks}</textarea></td>
	  <td align="left" class="table2">Amount Collected:</td>
	  <td class="table2"><input type="text" name="amountCollected" id="amountCollected" style="text-align: right" value="{$amtCollectedSelected}"></td>
	</tr>
	<tr>
  	<td align="left" class="table2">Customer Feedback:</td>
	  <td class="table2"><textarea Name="customerFeed" Rows="2" Cols="50">{$customerFeed}</textarea></td>
	  <td align="left" class="table2">Customer Signature:</td>
	  <td class="table2">______________________</td>
	</tr>
	<tr>
	  <td align="center" class="table2" colspan="6"><input class="button" type="submit" name="insertBtn" id="insertBtn" value="Submit" />
	  {if $isEdit == 1 || $complete == 1 || $inComplete == 1}
	    <a href="serviceList.php" class="link">Cancel</a>
	  {else}
	    <input class="button" type="submit" name="printBtn" id="printBtn" value="Print" />
	  {/if}
	  </td>
	</tr>
</table>
</form> 
{include file="footer.tpl"}